package adv4;

import java.util.Calendar;

public class CalTest {

	public static void main(String[] args) {
		// Calendar
		Calendar c = Calendar.getInstance();
		System.out.println(c);
		int year = c.get(Calendar.YEAR);
		System.out.println(year);
		int month = c.get(Calendar.MONTH);
		System.out.println(month + 1);
		int hour = c.get(Calendar.HOUR);
		System.out.println(hour);
		System.out.println(">>>>>>>>>>>>>>>>>>>>>");
		int days = c.get(Calendar.DAY_OF_YEAR);
		System.out.println("今天是今年的" + days + "天");
		int weeks = c.get(Calendar.WEEK_OF_YEAR);
		System.out.println("本周是今年的第" + weeks + "周");
		c.add(Calendar.HOUR, 50);
		System.out.println(c.getTime());
	}

}
